1. Technical Field
This invention generally relates to data processing, and more specifically relates to parallel processing in a computer system.
2. Background Art
Since the dawn of the computer age, computer systems have evolved into extremely sophisticated devices that may be found in many different settings. Computer systems typically include a combination of hardware (e.g., semiconductors, circuit boards, etc.) and software (e.g., computer programs). As advances in semiconductor processing and computer architecture push the performance of the computer hardware higher, more sophisticated computer software has evolved to take advantage of the higher performance of the hardware, resulting in computer systems today that are much more powerful than just a few years ago.
Many modem computer systems are multi-threaded, which means that multiple threads of control (or tasks) may execute simultaneously. When a computer program needs to execute tasks in parallel, the code to handle the parallelism in the computer program is typically hard-coded within the computer program itself. Note that the term “computer program” is broadly defined herein to include any computer software, including applications, utilities, operating system code, etc. The execution of tasks in parallel requires the computer program itself to be specifically designed and written to utilize multiple threads. Because the interfaces to utilize threads and processes are not identical across all operating systems, a hard-coded computer program that includes parallelism is not easily portable to other operating systems.
The computer program that is written to use multiple threads must also implement several other complex aspects related to parallelism, such as: 1) a method to limit or modify the amount of parallelism; 2) a method to easily measure overall progress; 3) a mechanism to allow or disallow cancel of the request at reasonable boundaries such that the cancel does not leave the state of the data used by the computer program in an unpredictable state; and 4) a mechanism to define whether each portion of the computer program in a thread is safe or must be fenced from other parts of the computer program running in parallel. These complexities make the implementation of parallel processing in computer programs very time-consuming and expensive to define, write, test, and especially debug.
Referring to FIG. 2, a prior art method 200 for executing tasks in parallel starts by defining multiple threads or jobs (step 210). Once multiple threads or jobs are defined, the support for parallel processing is hard-coded into the computer program (step 220), as described in detail in the preceding paragraph. Hard-coding parallelism into computer programs is time-consuming and does not port well to other platforms. Without a way to easily enable parallelism in a computer program, the computer industry will continue to suffer from inefficient ways of performing parallel processing in computer programs.